package com.example.estemplate.runner;

import com.example.estemplate.service.TemplateManagerService;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

//@Component
public class EsTemplateManagerRunner implements CommandLineRunner {

    private final TemplateManagerService templateManagerService;

    public EsTemplateManagerRunner(TemplateManagerService templateManagerService) {
        this.templateManagerService = templateManagerService;
    }

    @Override
    public void run(String... args) {
        templateManagerService.syncAllTemplates();
    }
}
